'use server'

import { redirect } from "next/navigation";


export const search = async (formData: FormData) => {
  const pNameOrCon = formData.get('pnameorcon')
  if (typeof pNameOrCon !== "string" || !pNameOrCon) {
    redirect("/");
  }
  redirect(`/search?pnameorcon=${pNameOrCon}`);
}